<div class="card-block dt-responsive">

    <div class="table-responsive">
        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <g:sortableColumn property="type" title="类型"/>
                    <g:sortableColumn property="fileName" title="文件名"/>
                    <g:sortableColumn property="fileUrl" title="链接"/>
                    <g:sortableColumn property="thumbnailUrl" title="缩略图链接"/>
                    <g:sortableColumn property="createdDate" title="创建时间"/>
                    <g:sortableColumn property="modifiedDate" title="修改时间"/>
                    <g:sortableColumn class="text-center" width="8%" property="buildTime" title="操作"/>
                </tr>
                </thead>
                <tbody>
                <g:each in="${attachmentList}">
                    <tr>
                        <td>
                            <g:link controller="attachment" action="show" id="${it?.id}"
                                    class="firstTd">${it?.type?.name}</g:link>
                        </td>

                        <td>${it?.fileName}</td>
                        <td>${it?.fileUrl}</td>
                        <td>${it?.thumbnailUrl}</td>

                        <td><g:formatDate date="${it?.createdDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                        <td><g:formatDate date="${it?.modifiedDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                        <td class="text-center">
                            <g:link class="m-r-15 text-primary ${this.attachmentPermission?.name == 'Read' ? 'disabled' : ''}"
                                    controller="attachment" action="edit"
                                    id="${it?.id}" params="[teamName: this.teamName]">
                                <i class="icofont icofont-ui-edit"></i>

                            </g:link>
                            <g:form controller="attachment" action="delete" class="inline"
                                    id="${it.id}"
                                    method="DELETE">
                                <button class="deleteBtn text-danger ${this.attachmentPermission?.name == 'Read' ? 'disabled' : ''}" type="button">
                                    <i class="icofont icofont-trash"></i>

                                </button>
                            </g:form>

                        </td>
                    </tr>
                </g:each>
                </tbody>
            </table>
        </div>
    </div>

</div>
